/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-11-09
 * Time: 9:00
 */


//单例模式的 - 饿汉模式
class Singleton {
    private static Singleton instance = new Singleton();
    private Singleton(){}

    public static Singleton getInstance(){
        return instance;
    }
}

public class Demo1 {
    public static void main(String[] args) {
        Singleton instance = Singleton.getInstance();
    }
}
